package com.googlecode.restitory.api.gae;

import com.google.appengine.api.datastore.DatastoreService;

public class DatastoreServiceFactory {

	private static DatastoreServiceFactory ME = new DatastoreServiceFactory();

	protected DatastoreServiceFactory() {

	}

	public static DatastoreServiceFactory instance() {
		return ME;
	}

	public static DatastoreServiceFactory setInstance(
			DatastoreServiceFactory factory) {
		DatastoreServiceFactory ret = ME;
		ME = factory;
		return ret;
	}

	public DatastoreService getDatastoreService() {
		return com.google.appengine.api.datastore.DatastoreServiceFactory
				.getDatastoreService();
	}

}
